package io.github.frailty9.crserver.model

import java.time.LocalDateTime
import com.mybatisflex.annotation.Column
import com.mybatisflex.annotation.Id

/**
 * 账户表
 */
data class Account(
    @Id
    override var id: Long? = null,
    /**
     * username
     */
    var username: String? = null,
    /**
     * password
     */
    var password: String? = null,
    /**
     * role
     */
    var role: String? = null,

    @Column(version = true)
    override var version: Int? = null,

    @Column(onInsertValue = "CURRENT_TIMESTAMP")
    var createTime: LocalDateTime? = null,

    @Column(onInsertValue = "CURRENT_TIMESTAMP", onUpdateValue = "CURRENT_TIMESTAMP")
    var updateTime: LocalDateTime? = null,

    @Column(isLogicDelete = true)
    override var deleted: Int? = null
) : BaseModel
